package com.joke.locomotive;

import java.util.Date;

import com.joke.util.Const;
import com.joke.util.DateUtil;

public class FetchJokeLoco {
	
	public static void fetchHot() {
		String date = DateUtil.formatString(new Date(), DateUtil.YMD);
		String [] filePaths = new String[2];
		filePaths[0] = Const.fabu+date+Const.qiubaiHotName;
		filePaths[1] = Const.fabu+date+Const.baisiHotName;
		ImportHot.readHot(filePaths);
	}
	
	public static void fetchTxt() {
		String date = DateUtil.formatString(new Date(), DateUtil.YMD);
		String [] filePaths = new String[2];
		filePaths[0] = Const.fabu+date+Const.baisiTxTName;
		filePaths[1] = Const.fabu+date+Const.neihanTxTName;
		ImportTxt.readTxt(filePaths);
	}
	
	public static void fetchImage() {
		String date = DateUtil.formatString(new Date(), DateUtil.YMD);
		String [] filePaths = new String[2];
		filePaths[0] = Const.fabu+date+Const.neihanImagesName;
		filePaths[1] = Const.fabu+date+Const.pengfuGifImagesName;
		ImportImage.readImage(filePaths);
	}
	
	public static void fetchVideo() {
		String date = DateUtil.formatString(new Date(), DateUtil.YMD);
		String [] filePaths = new String[2];
		filePaths[0] = Const.fabu+date+Const.qiubaiVideoName;
		filePaths[1] = Const.fabu+date+Const.baisiVideoName;
		ImportVideo.readVideo(filePaths);
	}
	
	public static void main(String[] args)  throws Exception{  
		/*String str = HttpClientUtil.getInstance().sendHttpGet("http://neihanshequ.com/");
		System.out.println(str);*/
		fetchHot();
		fetchTxt();
		fetchImage();
		fetchVideo();
    }

	
}
